<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Flexbox Example</title>
  <style>
    .container {
      display: flex;
      justify-content: space-between;
      /* 主轴上的对齐方式 */
      align-items: center;
      /* 交叉轴上的对齐方式 */
      background-color: #f0f0f0;
      padding: 10px;
    }

    .item {
      width: 100px;
      height: 100px;
      background-color: #3498db;
      margin: 5px;
      display: flex;
      justify-content: center;
      align-items: center;
      color: white;
      font-weight: bold;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
  </div>
</body>

</html>